const app = getApp();
Page({

  data: {
    scr_width: app.scr_width,
    scr_height: app.scr_height,
    scr_widthBan: app.scr_widthBan,
    imgUrls: [
      { 
        img: 'https://gitee.com/zhizou/file/raw/master/img/other/banner1.jpg'
      },
      {
        img: 'https://gitee.com/zhizou/file/raw/master/img/other/banner2.jpg'
      },
      { 
        img: 'https://gitee.com/zhizou/file/raw/master/img/other/banner3.jpg' 
      }
    ],
  },
  btn_phone:function(e){
    var that = this;
    var tel = e.currentTarget.dataset.tel;
    wx.makePhoneCall({
      phoneNumber: tel,
    });
  },
  open_addr: function (e) {
    wx.getLocation({
      type: 'gcj02', //返回可以用于wx.openLocation的经纬度
      success: function (res) {
        var latitude = res.latitude,
            longitude = res.longitude;
        wx.openLocation({
          latitude: latitude,
          longitude: longitude,
          name:'双流区教师公寓',
          address:'朝阳路教师公寓15幢',
          scale: 28
        })
      }
    })
    // wx.openLocation({
    //   latitude: '30.5596030000',
    //   longitude: '104.0919190000',
    // });
  },
  onLoad: function (options) {
    
  },

  onReady: function () {
  
  },

  onShareAppMessage: function () {
  
  }
})